<?php

include("islogged.php");

include("include/connection.php");

if(isset($_GET["id"]))
{
	$query = "select * from user where id_user = ". $_GET["id"];
	$result = mysql_query($query);
	$row = mysql_fetch_array($result,MYSQL_BOTH);
}

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link rel="stylesheet" href="css/style.css" type="text/css" >
<link rel="icon" type="image/png" href="images/restapp.png" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Admin</title>
</head>
<body>

	<div id='topmenu'>
		<div>
			<img style="float:left" src="images/logo.png" />
		</div>
		<ul>
				<li><a href="space.php">Home</a></li>
				<li><a href="signup.php">Signup</a></li>
				<li><a href="faq.php">FAQ</a></li>
				<li><a href="contact.php">Contact</a></li>
		</ul>
		<span id="money">1$</span>
		<img  src="images/home.png" onclick=" document.location.href='admin.php'" />
		<img  src="images/admprofile.png" onclick=" document.location.href='../editprofile.php'" />
		<img  src="images/disconnect.png" onclick=" document.location.href='disconnect.php'" />
	</div>

	<div id="limit">
<div id="user">
<h4><img src="images/loggedin.png" />User Account</h4>
<div id="info_user">
<h3>Hello Admin</h3>
<a href="editprofile.php"><h6 style="display:inline">Modify your profile</h6></a>
</div>
<!--#info_user-->
</div>
<!--#user-->
<div id="operations">
<ul>
	<h4>Categories</h4>
	<li><a href="profile.php?id=1"><img src="images/profile.png" />Profile</a>
	</li>
	<li><a href="videos.php"><img src="images/video.png" />Videos</a>
	</li>
	</li>
	<li><a href="members.php"><img src="images/teacher.png" />Members</a>
	</li>
	</li>
</ul>
</div>

<div id="page">

<h3>Profile</h3>
			<fieldset class="profile">
				<legend>USER INFO: </legend>
			<?php
			if($row)
			{ 
			?>
						<img  style="float:right;cursor:pointer" src="images/back.png" />
						<div class="labelprofile">First Name :</div>  <div class="labelprofilevalue" ><?php echo $row["fname"]; ?></div>
						<div class="labelprofile">Last Name :</div> <div class="labelprofilevalue" ><?php echo $row["pname"]; ?></div>
						<div class="labelprofile">Email :</div> <div class="labelprofilevalue" ><?php echo $row["mail"]; ?> </div>
						<div class="labelprofile">Paypal ID :</div> <div class="labelprofilevalue" ><?php echo $row["paypal_id"]; ?></div>
			
			<?php
			} else
			{
			?>
			<div class="labelprofile">No user found.</div>
			<?php
			}
			?>
			</fieldset>
</div>

<div id="copyrights"><span id="copytext">All rights reserved | Copyrights  2013 </span></div>

</div>



   		
</body>
</html>